package com.five.zhh.fiveinfive.room.message.operate;

import com.five.zhh.fiveinfive.room.message.OperateTittle;
import com.five.zhh.fiveinfive.room.message.UserOperate;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * 系统的广播消息，用于在聊天栏展示内容
 */
@Data
public class SystemBroadcastOperate extends UserOperate {

    private String message;

    private final LocalDateTime time;

    public SystemBroadcastOperate(String roomCode, String message) {
        super(OperateTittle.BROADCAST, roomCode);
        this.message = message;
        this.time = LocalDateTime.now();
    }

    public SystemBroadcastOperate() {
        super(OperateTittle.BROADCAST);
        this.time = LocalDateTime.now();
    }

}
